import Cookies from 'js-cookie'

const TokenKey = 'loginToken'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getLogintime() {
  return Cookies.get('lastLoginTime')
}

export function setLogintime(time) {
  return Cookies.set('lastLoginTime', time)
}

export function removeLogintime() {
  return Cookies.remove('lastLoginTime')
}